namespace PersonalHealth.Data.Model
{
    using System;
    using System.Collections.Generic;
    using Core.Model;

    public partial class User : SynchronizeItem
    {
        
        public string UserName { get; set; }
        public string Password { get; set; }
        public int UserTypeId { get; set; }
        public string IdCard { get; set; }
        public string IcCard { get; set; }
        public string ServiceNo { get; set; }
        public Nullable<int> SexId { get; set; }
        public string UserImageUrl { get; set; }
        public Nullable<int> Height { get; set; }
        public Nullable<double> Weight { get; set; }
        public string Mobile { get; set; }
        public string TelPhone { get; set; }
        public Nullable<System.DateTime> Birthday { get; set; }
        public string Address { get; set; }
        public string PostCode { get; set; }
        public string Email { get; set; }
        public string AlterUserId { get; set; }
        public Nullable<bool> IsEnabled { get; set; }
        public Nullable<bool> IsActive { get; set; }
        public Nullable<int> DepartmentId { get; set; }

        public virtual Sex Sex { get; set; }
        public virtual Department Department { get; set; }

        public virtual UserType UserType
        {
            get
            {
                userType = (UserType)UserTypeId;
                return userType;
            }
            set
            {
                UserTypeId = (int)value;
                userType = value;
            }
        }

        private UserType userType;
    }
}
